package com.lch;

import java.lang.reflect.Proxy;

/**
 * @author: liuchenhui
 * @create: 2019-06-18 19:50
 **/
public class RpcProxy {

    public <T> T createProxy(Class<?> clazz, String ip, String host) {
        return (T) Proxy.newProxyInstance(clazz.getClassLoader(), new Class<?>[]{clazz}, new RpcHandler(ip, host));
    }
}
